<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>后台登录-X-admin2.2</title>
    <meta content="webkit|ie-comp|ie-stand" name="renderer">
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"
          name="viewport"/>
    <meta content="no-siteapp" http-equiv="Cache-Control"/>
    <link href="./css/font.css" rel="stylesheet">
    <link href="./css/login.css" rel="stylesheet">

    <style>
        /*
* @Author: xuebingsi
* @Date:   2019-04-01 13:37:17
* @Last Modified by:   zhibinm
* @Last Modified time: 2019-04-01 13:37:19
*/
        .login-bg{
            /*background: #eeeeee url() 0 0 no-repeat;*/
            background:url(../images/bg.png) no-repeat center;
            background-size: cover;
            overflow: hidden;
        }
        .login{
            margin: 120px auto 0 auto;
            min-height: 420px;
            max-width: 420px;
            padding: 40px;
            background-color: #ffffff;
            margin-left: auto;
            margin-right: auto;
            border-radius: 4px;
            /* overflow-x: hidden; */
            box-sizing: border-box;
        }
        .login a.logo{
            display: block;
            height: 58px;
            width: 167px;
            margin: 0 auto 30px auto;
            background-size: 167px 42px;
        }
        .login .message {
            margin: 10px 0 0 -58px;
            padding: 18px 10px 18px 60px;
            background: #189F92;
            position: relative;
            color: #fff;
            font-size: 16px;
        }
        .login #darkbannerwrap {
            background: url(../images/aiwrap.png);
            width: 18px;
            height: 10px;
            margin: 0 0 20px -58px;
            position: relative;
        }

        .login input[type=text],
        .login input[type=file],
        .login input[type=password],
        .login input[type=email], select {
            border: 1px solid #DCDEE0;
            vertical-align: middle;
            border-radius: 3px;
            height: 50px;
            padding: 0px 16px;
            font-size: 14px;
            color: #555555;
            outline:none;
            width:100%;
            box-sizing: border-box;
        }
        .login input[type=text]:focus,
        .login input[type=file]:focus,
        .login input[type=password]:focus,
        .login input[type=email]:focus, select:focus {
            border: 1px solid #27A9E3;
        }
        .login input[type=submit],
        .login input[type=button]{
            display: inline-block;
            vertical-align: middle;
            padding: 12px 24px;
            margin: 0px;
            font-size: 18px;
            line-height: 24px;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            cursor: pointer;
            color: #ffffff;
            background-color: #189F92;
            border-radius: 3px;
            border: none;
            -webkit-appearance: none;
            outline:none;
            width:100%;
        }
        .login hr {
            background: #fff url("") 0 0 no-repeat;
        }
        .login hr.hr15 {
            height: 15px;
            border: none;
            margin: 0px;
            padding: 0px;
            width: 100%;
        }
        .login hr.hr20 {
            height: 20px;
            border: none;
            margin: 0px;
            padding: 0px;
            width: 100%;
        }
    </style>
    <link href="./css/xadmin.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js" type="text/javascript"></script>
    <script charset="utf-8" src="./lib/layui/layui.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="login-bg">

<div class="login layui-anim layui-anim-up">
    <div class="message">x-admin2.0-管理登录</div>
    <div id="darkbannerwrap"></div>

    <form class="layui-form" method="post" action="/adminLogin">
        <input class="layui-input" lay-verify="required" name="adminName" placeholder="用户名" type="text">
        <hr class="hr15">
        <input class="layui-input" lay-verify="required" name="adminPassword" placeholder="密码" type="password">
        <hr class="hr15">
        <input lay-filter="login" lay-submit style="width:100%;" type="submit" value="登录">
        <hr class="hr20">
    </form>
</div>

<script>
    $(function () {
        layui.use('form', function () {
            var form = layui.form;
            // layer.msg('玩命卖萌中', function(){
            //   //关闭后的操作
            //   });
            //监听提交
            form.on('submit(login)', function (data) {
                // alert(888)
                $.post("/adminLogin",data.field,function (data) {
                    if (data=="true")
                    layer.msg("登录成功", {
                        icon: 1,
                        time: 1000
                    } ,function () {
                        location.href = '/'
                    });
                    else if ((data=="false"))
                        layer.msg("账号或密码错误", {
                            icon: 2,
                            time: 1000
                        });
                });

                return false;
            });
        });
    })
</script>
<!-- 底部结束 -->
<script>
    //百度统计可去掉
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</body>
</html>